package com.imooc.luckymoney.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TemplateController {
    /**
     * 使用模版技术
     * @return
     */
    @GetMapping(value = "/templateTest")
    public String templateTest(){
        return "index";
    }

    /**
     * @Controller + @ResponseBody返回json
     * @return
     */
    @GetMapping(value = "/jsonTest")
    @ResponseBody
    public String test2(){
        return "responseBody return json";
    }
}
